package com.xg.order.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xg.order.dao.OrderDao;
import com.xg.order.pojo.Order;
import com.xg.order.pojo.OrderInfo;
import com.xg.order.service.OrderService;


@Service
public class OrderServiceImpl implements OrderService {
	@Autowired
	private OrderDao orderDao;

	public List<Order> selectAllOrder() {
		List<Order> list = orderDao.selectAllorder();
		return list;
	}

	public boolean addOrder(Order order) {
		int n =orderDao.addOrder(order);
		return n > 0;
	}

	public boolean addOrderInfo(OrderInfo orderInfo) {
		int n =orderDao.addOrderInfo(orderInfo);
		return n > 0;
	}
	
}
